{% load wpadmin_menu_tags i18n %}
{% spaceless %}
{% if is_user_allowed and not item.is_empty and not item.is_user_tools %}
	<li class="{% if is_first %}wp-first-item{% endif %}{% if is_last %} wp-last-item{% endif %}{% if not item.enabled %} wp-disabled{% endif %}{% if is_selected %} wp-current{% endif %}{% if not item.url %} wp-no-url{% endif %}{% if item.children %} wp-has-submenu{% else %}{% if item.add_url %} wp-has-add-url{% endif %}{% endif %}" {% if item.css_styles %}style="{{ item.css_styles }}"{% endif %}>
		<a href="{% if item.url and item.enabled %}{{ item.url }}{% else %}javascript:;{% endif %}"{% if item.description %} title="{{ item.description }}"{% endif %}{% if item.accesskey %} accesskey="{{ item.accesskey }}"{% endif %} class="{% if request.path == item.url %}wp-current{% endif %}">{{ item.title }}</a>
		{% if not item.children and item.add_url %}<a title="{% trans "Add" %}" class="wp-add-url{% if request.path == item.add_url %} wp-current{% endif %}" href="{{ item.add_url }}">+</a>{% endif %}
		{% if item.children and item.enabled %}
		<div class="wp-submenu">
			<div class="wp-submenu-wrap">
				<div class="wp-submenu-head">{{ item.title }}</div>
				<ul>
					{% for child_item in item.children %}
						{% wpadmin_render_menu_item child_item forloop.first forloop.last %}
					{% endfor %}
				</ul>
			</div>
		</div>
		{% endif %}
	</li>
{% endif %}
{% endspaceless %}
